import React, {Component} from 'react';
import {
    View,
    Text,
    StyleSheet,
    TouchableOpacity,
    StatusBar
} from 'react-native';
import Toast, {DURATION} from 'react-native-easy-toast';
import {showHUDLoading, hidenHUDLoading, showHUDMessage} from './react-native-HUD/HUD';

export default class Type extends Component {

    render() {
        return (
            <View style={styles.container}>
                <TouchableOpacity style={styles.button} activeOpacity={0.5} onPress={() => this.refs.toast.show('点击了分类巴啦啦testtttttttt',DURATION.LENGTH_LONG)
                }>
                    <Text style={{color: 'white'}}>分类</Text>
                </TouchableOpacity>
                {/*<StatusBar barStyle={'default'} />*/}
                <Toast
                    ref="toast"
                    style={{backgroundColor:'black'}}
                    position='center'
                    positionValue={500}
                    fadeInDuration={750}
                    fadeOutDuration={1000}
                    opacity={0.8}
                    textStyle={{color:'white'}}
                />
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#F5FCFF',
    },
    button: {
        width: 120,
        height: 45,
        borderRadius: 5,
        alignItems: 'center',
        justifyContent: 'center',
        backgroundColor: '#4398ff',
    }
});